home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / utilities / disk / dskspr20.lha / diskspareii / support / diskspare.doc next >
Encoding:
Text File  |  1994-05-02  |  5.2 KB  |  187 lines

  1.  
  2. *****************************************************************
  3. *                                *
  4. *    NOTE:   IF YOU USE THE DISKSPARE.DEVICE FOR YOUR    *
  5. *    PROGRAMS YOU HAVE TO COPY THIS DOC.FILE TOO !!!!    *
  6. *                                *
  7. *    Note:                                        *
  8. *    I can only support your program in future releases    *
  9. *    of the device, if you send me a FREE copy.        *
  10. *                                *
  11. *****************************************************************
  12.  
  13. TABLE OF CONTENTS
  14.  
  15. diskspare.device/CMD_Remove
  16. diskspare.device/CMD_GetGeometry
  17. diskspare.device/CMD_RawRead
  18. diskspare.device/CMD_RawWrite
  19. diskspare.device/CMD_Eject
  20. diskspare.device/Open
  21.  
  22. The other commands work like the corresponding trackdisk cmds.
  23.  
  24.  
  25. NAME        Remove
  26.  
  27. FUNCTION    If you are not the FastFileSystem, and I guess 
  28.         you aren't, NEVER call Remove ! 
  29.         It's no use calling Remove !!
  30.         The best thing is to forget that there's a 
  31.         cmd called Remove !!! 
  32.         IF you call this forgotten cmd and the DD<>HD
  33.         autoswitch is enabled (Bit 2 in Flags is set), the 
  34.         system WILL crash !!!!
  35.         If you want to add a diskchange-int, use the
  36.         addchangeint/remchangeint cmd instead.
  37.         
  38.         Why was this patch necessary ?
  39.         Because there's a needless restriction in the FFS:
  40.         It checks, if the devicename is 'trackdisk.device' 
  41.         and if it isn't, GetGeometry won't be called.
  42.         
  43.         I tried to fix the disksize in the dosenvec-struct
  44.         and all programs like FixDisk, DiskSalv, Format etc 
  45.         worked fine. BUT the FFS says 'Not a DOS Disk'...
  46.         
  47. SEE ALSO    Includes/exec/alerts.i
  48.  
  49.  
  50.  
  51. NAME        GetGeometry
  52.  
  53. FUNCTION    Works like trackdisk. If you set Bit 2 when opening
  54.         the device (to allow HD mode), there are two 
  55.         possibilities for Sectors per Track:
  56.         12 sectors/track and 24 sectors/track.
  57.         You have to check this after each diskchange !
  58.         If bit 2 isn't set, there will always be 12 sec/tr
  59.         even with a hd disk in a hd drive, which causes
  60.         read/write errors when trying to write a DD track
  61.         to a HD disk in a HD drive.
  62.                 
  63. SEE ALSO    AutoDocs/trackdisk.doc
  64.  
  65. BUGS        There was a bug in the first release (V1.6):
  66.         The value returned in dg_CylSectors was wrong.
  67.         I forgot an 'ext.l', so the contents of the 
  68.         high order word was rubbish. Fixed in V2.0.
  69.         
  70.  
  71.         
  72. NAME        RawRead
  73.  
  74. FUNCTION    No Function ! Returns IOERR_NOCMD. Use trackdisk
  75.         device for rawread.
  76.  
  77.         
  78.         
  79. NAME        RawWrite
  80.  
  81. FUNCTION    No Function ! Returns IOERR_NOCMD. Use trackdisk
  82.         device for rawwrite.
  83.         
  84.         
  85.         
  86. NAME        Eject
  87.  
  88. FUNCTION    No Function ! Returns IOERR_NOCMD. Use trackdisk
  89.         device to eject (if you've got a drive which ejects).
  90.         
  91.         
  92.         
  93. NAME        OpenDevice
  94.  
  95. FUNCTION    Opens the device with a drive-specific set of flags.
  96.         There's something special about the flags:
  97.         
  98.         If the device wasn't opened yet, everything works as
  99.         usual. If the device was already opened (via Mount)
  100.         your flags will be ignored, but the device won't 
  101.         return an error. (Some well known programs crash
  102.         when an OPENFAIL was returned ??? They obviously
  103.         don't use the fssm_Flags when opening AND don't 
  104.         check for errors ?¿?)
  105.         
  106.         The active flags are returned in IO_ACTUAL. So you 
  107.         can check whether the flags fit your needs or not.        
  108.         
  109.         Why ?
  110.         If the user has mounted the device with HighCyl = 79
  111.         and/or hd-mode disabled then it's his decision not to 
  112.         use it and you HAVE TO accept that.
  113.         It's the users Amiga not yours. 
  114.  
  115.         The minimum you get is:
  116.         
  117.         heads:              2
  118.         tracks:            160
  119.         sectors/track:       12
  120.         bytes/sector:        512        
  121.         
  122.         # of sectors:           1920
  123.         total bytes:         983040
  124.  
  125.  
  126. SEE ALSO    AutoDocs/exec.doc/opendevice
  127.          
  128.  
  129. FLAGS
  130.         BIT    0    0: disable diskchange for DFX:
  131.                 1: enable diskchange for DFX:
  132.         Works only when mounting the device with the FastFileSystem.
  133.         When you open the device and don't call the forgotten
  134.         cmd the diskchange-int of the corresponding trackdisk
  135.         drive won't be affected.
  136.         
  137.         BIT    1    0: HighCyl is Cyl. 79
  138.                 1: HighCyl is Cyl. 81
  139.         When set to '1' trackdisk WILL be patched !
  140.         
  141.         BIT    2    0: ONLY 960K/984K mode (DD) available
  142.                 1: Autodetection of DD/HD-disks (1968K)
  143.         Call GetGeometry to get the right disksize. See above.
  144.         The patch for the ffs is in the remove cmd. So if you
  145.         open without bit 1 set and don't call the forgotten cmd
  146.         NOTHING is patched !!
  147.                 
  148.         BIT    3-31    are currently unused and RESERVED.                
  149.                 
  150.  
  151.  
  152. NOTES        
  153.  
  154.     HD-Mode:
  155.     To check if the drive is a highdensity one you may call
  156.     GetUnitID from the disk.resource. Here are the Results:
  157.         
  158.     No Disk in any Drive    ->    returns 0x00000000
  159.     Any Disk in a DD Drive    ->    returns 0x00000000
  160.     A DD-Disk in a HD Drive ->    returns 0x00000000
  161.     A HD-Disk in a HD Drive    ->    returns 0xAAAAAAAA
  162.     No Drive connected    ->    returns 0xFFFFFFFF
  163.         
  164.     As you can see, it's not possible to check if the drive
  165.     is a hd one.
  166.     So if you don't want to waste chipmem, you have to ask the
  167.     user whether he's got a hd drive or not.
  168.  
  169.         AddChangeInt:
  170.         If you've already added a ChangeInt with the trackdisk.device,
  171.         you needn't add one with diskspare.device because it's directly 
  172.         passed through to the trackdisk.device.
  173.  
  174.     Inhibit:
  175.     It's a good idea to inhibit the corresponding trackdisk drive
  176.     (DFX) when accessing the disk via diskspare.device. Also
  177.     check for mounted diskspare drives. Don't rely on the names 
  178.     DS0: to DS3: when you inhibit the DOS.
  179.     
  180.     
  181.     General:
  182.     The main purpose of this device is to be mounted with the
  183.     fastfilesystem. So always remember that you may not be
  184.     the only accessor !!
  185.         
  186.     
  187.